/**
 * @brief Timer driver header
 * @author Gilad Avidov
 */
#ifndef TIMER_H_INCLUDED
#define TIMER_H_INCLUDED

//11,059,000 / 12 = 921,583
// 921,583 / 100  = 9,215 = 0x23FF
#define TH0_VAL (0xFF - 0x22)		// timer tick
#define TL0_VAL (0xFF - 0xFF)		// one per msec

void timer0_run();

unsigned long timer0_get_time_elapsed();

void timer0_stop();

void timer0_reset();

extern volatile unsigned long timer0_irq_cnt;

#endif // TIMER_H_INCLUDED
